/**
 * amis v6.13.0
 * build time: 2025-08-12
 * Copyright 2018-2025 baidu
 */

'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var _Alert = require('amis-ui/lib/components/Alert2');
var tslib = require('tslib');
var React = require('react');
var amisCore = require('amis-core');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var _Alert__default = /*#__PURE__*/_interopDefaultLegacy(_Alert);
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

var __react_jsx__ = require('react');
var _J$X_ = (__react_jsx__["default"] || __react_jsx__).createElement;
var _J$F_ = (__react_jsx__["default"] || __react_jsx__).Fragment;


;var AlertRenderer = /** @class */function (_super) {
  tslib.__extends(AlertRenderer, _super);
  function AlertRenderer() {
    return _super !== null && _super.apply(this, arguments) || this;
  }
  AlertRenderer.prototype.render = function () {
    var _a = this.props,
      render = _a.render,
      body = _a.body,
      level = _a.level,
      icon = _a.icon,
      showIcon = _a.showIcon,
      actions = _a.actions,
      rest = tslib.__rest(_a, ["render", "body", "level", "icon", "showIcon", "actions"]);
    if (amisCore.isPureVariable(level)) {
      level = amisCore.resolveVariableAndFilter(level, this.props.data);
    }
    if (amisCore.isPureVariable(icon)) {
      icon = amisCore.resolveVariableAndFilter(icon, this.props.data);
    }
    if (amisCore.isPureVariable(showIcon)) {
      showIcon = amisCore.resolveVariableAndFilter(showIcon, this.props.data);
    }
    var actionsDom = actions ? React__default["default"].isValidElement(actions) ? actions : render('alert-actions', actions) : null;
    return _J$X_(_Alert__default["default"], tslib.__assign({}, rest, {
      level: level,
      icon: icon,
      showIcon: showIcon,
      actions: actionsDom
    }), render('body', body));
  };
  AlertRenderer = tslib.__decorate([amisCore.Renderer({
    type: 'alert'
  })], AlertRenderer);
  return AlertRenderer;
}(React__default["default"].Component);

exports.AlertRenderer = AlertRenderer;
